home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / files / fcntl < prev    next >
Encoding:
Text File  |  1993-10-26  |  2.1 KB  |  50 lines  |  [TEXT/$Tcl]

  1.  
  2.  
  3.           fcntl fileId attribute ?value?
  4.                This command either sets or clears  a  file  option  or
  5.                returns its current value.  If value are not specified,
  6.                then the current value of attribute  is  returned.  The
  7.                following attributes may be specified:
  8.  
  9.                RDONLY - The file is  opened  for  reading  only.  (Get
  10.                only)
  11.  
  12.                WRONLY - The file is opened  for  writing  only.   (Get
  13.                only)
  14.  
  15.                RDWR - The file is  opened  for  reading  and  writing.
  16.                (Get only)
  17.  
  18.                READ - If the file is readable. (Get only).
  19.  
  20.                WRITE - If the file is writable. (Get only).
  21.  
  22.                APPEND - The file is  opened  for  append-only  writes.
  23.                All writes will be forced to the end of the file.
  24.  
  25.                NONBLOCK - The file is to be accessed with non-blocking
  26.                I/O.  See the read system call for a description of how
  27.                it affects the behavior of file reads.
  28.  
  29.                CLOEXEC - Close the file on an process  exec.   If  the
  30.                execl  command  or some other mechanism causes the pro-
  31.                cess to do an exec, the file will  be  closed  if  this
  32.                option is set.
  33.  
  34.                NOBUF - The file is not buffered. If set, then there no
  35.                stdio buffering for the file.
  36.  
  37.                LINEBUF - Output the file will be  line  buffered.  The
  38.                buffer  will be flushed when a newline is written, when
  39.                the buffer is full, or when input is requested.
  40.  
  41.                The APPEND, NONBLOCK, and CLOEXEC attributes may be set
  42.                or cleared by specifying the attribute name and a value
  43.                1 to set the attribute and 0 to clear it.
  44.  
  45.                The NOBUF and LINEBUF attributes may  only  be  set  (a
  46.                value  of  1)  and  only  one  of  the  options  may be
  47.                selected.  Once set, it  may  not  be  changed.   These
  48.                options  should  be  set before any I/O operations have
  49.                been done on the file or data may be lost.
  50.